
const app = getApp()
import {
  HomeIndex
} from 'index-modal.js';
import {
  Config
} from '../../../utils/config.js';
var Function = require("../../../utils/function.js");
var index = new HomeIndex(); //实例化 首页 对象

Page({
  data: {
    goods_id:'',
    comp_id:"",
    jingdu:'',
    weidu:'',
    id:'',
    detail:{},
    url:Config.Url
  },
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },

  forMoreInfoTap: function () {
    wx.navigateBack({
      delta: 1
    })
  },
  forMoreInfoTap2: function () {
    wx.navigateBack({
      delta: 2
    })
  },
  onLoad: function (options) {
    this.setData({
      goods_id: options.goods_id,
      comp_id: options.comp_id,
      jingdu: options.jingdu,
      weidu: options.weidu,
      id: options.id
    })

    this._getteachDetail()
  },
  _getteachDetail(){ //获取理疗师详情
    var that =this;
    let data ={
      goods_id: that.data.goods_id,
      comp_id: that.data.comp_id,
      jingdu: that.data.jingdu,
      weidu: that.data.weidu,
      id: that.data.id,
      uid: wx.getStorageSync('members').id
    }

    index.getteachDetail(data,(res)=>{
       if(res.code == 200){
         that.setData({
           detail:res.data
         })
       }
    })
  },

  quhaoa(){  //取号
    let that =this;
    wx.navigateTo({
      url: '../quhao/quhao?id='+that.data.id
    })
  } 

})
